import { Button, Modal } from "antd";
import { FC, PropsWithChildren } from "react";
const SubmitModal: FC<
  PropsWithChildren<{
    show: boolean;
    subLoading: boolean;
    changeshow: (args: any) => void;
    SubmitFrom: () => void;
  }>
> = props => {
  return (
    <>
      <Modal
        width={350}
        open={props.show}
        title="留言信息"
        onCancel={() => props.changeshow(false)}
        maskClosable={false}
        footer={[
          <Button
            key="submit"
            type="primary"
            loading={props.subLoading}
            onClick={props.SubmitFrom}
          >
            确定
          </Button>
        ]}
      >
        {props.children}
      </Modal>
    </>
  );
};

export default SubmitModal;
